package com.example.taobaounion.utils;

import com.example.taobaounion.constant.Constants;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class RetrofitUtils {


    private static final RetrofitUtils ourInstance = new RetrofitUtils();

    private final Retrofit mRetrofit;

    public static RetrofitUtils getInstance() {
        return ourInstance;
    }

    public Retrofit getRetrofit() {
        return mRetrofit;
    }

    private RetrofitUtils() {
        // create retrofit
        mRetrofit = new Retrofit.Builder()
                .baseUrl(Constants.BASE_URL)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

}
